//
// Created by HP on 2025/12/1.
//

#ifndef FLIGHTSERVER_FRIEND_H
#define FLIGHTSERVER_FRIEND_H
#include "Model.h"


// 关联两个用户，用于处理需要帮助买票和对话
class Friend : public Model{
public:
    std::string id;
    std::string user1_id;
    std::string user2_id;
    std::string status; // 好友状态：pending, accepted, blocked
    std::string create_time;
    std::string update_time;

    Friend();
    
    void bind(const std::string& key, const std::string& value);
    
    bool save();
    
    // Getter methods
    std::string getId() const { return id; }
    std::string getUser1Id() const { return user1_id; }
    std::string getUser2Id() const { return user2_id; }
    std::string getStatus() const { return status; }
    std::string getCreateTime() const { return create_time; }
    std::string getUpdateTime() const { return update_time; }
    
    // Setter methods
    void setId(const std::string& newId) { id = newId; }
    void setUser1Id(const std::string& newUser1Id) { user1_id = newUser1Id; }
    void setUser2Id(const std::string& newUser2Id) { user2_id = newUser2Id; }
    void setStatus(const std::string& newStatus) { status = newStatus; }
    void setCreateTime(const std::string& newCreateTime) { create_time = newCreateTime; }
    void setUpdateTime(const std::string& newUpdateTime) { update_time = newUpdateTime; }
};


#endif //FLIGHTSERVER_FRIEND_H
